#ifndef QOPENHARMONYMEDIASERVICEPLUGIN_H
#define QOPENHARMONYMEDIASERVICEPLUGIN_H

#include <QMediaServiceProviderPlugin>

QT_BEGIN_NAMESPACE

class QOPenHarmonyMediaServicePlugin
        : public QMediaServiceProviderPlugin
        , public QMediaServiceSupportedDevicesInterface
        , public QMediaServiceDefaultDeviceInterface
        , public QMediaServiceCameraInfoInterface
        , public QMediaServiceFeaturesInterface
{
    Q_OBJECT
    Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
    Q_INTERFACES(QMediaServiceDefaultDeviceInterface)
    Q_INTERFACES(QMediaServiceCameraInfoInterface)
    Q_INTERFACES(QMediaServiceFeaturesInterface)
    Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0"
                      FILE "openharmony_mediaservice.json")

public:
    QOPenHarmonyMediaServicePlugin();
    ~QOPenHarmonyMediaServicePlugin();

    QMediaService* create(QString const& key) override;
    void release(QMediaService *service) override;

    QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const override;

    QByteArray defaultDevice(const QByteArray &service) const override;
    QList<QByteArray> devices(const QByteArray &service) const override;
    QString deviceDescription(const QByteArray &service, const QByteArray &device) override;

    QCamera::Position cameraPosition(const QByteArray &device) const override;
    int cameraOrientation(const QByteArray &device) const override;
};

QT_END_NAMESPACE

#endif // QOPENHARMONYMEDIASERVICEPLUGIN_H
